#include <mkl.h>
#include <stdio.h>
#include <complex>

using namespace std;
int main(){
    complex<double>* cmx = new complex<double>[100];
    complex<double>* cmy = new complex<double>[100];
    complex<double>* cm_result = new complex<double>[100];
    for(int i=0; i<100; i++){
        cmx[i].real(i);
        cmx[i].imag(i+1);
        cmy[i].real(i+2);
        cmy[i].imag(i+3);
    }
    cblas_zdotc_sub(1, cmx, 1, cmy, 1, cm_result);
    for(int i=0; i<10; i++){
        printf("(%lf %lf) ", cmx[i].real(), cmx[i].imag());
    }
    printf("\n");
    for(int i=0; i<10; i++){
        printf("(%lf %lf) ", cmy[i].real(), cmy[i].imag());
    }
    printf("\n");
    for(int i=0; i<10; i++){
        printf("(%lf %lf) ", cm_result[i].real(), cm_result[i].imag());
    }
    printf("\n");
}